/* start--主题色--start */
$themes: (
    red_theme: (
        font_color: #E60B30,
        background_color: #E60B30,
        border_color: #E60B30,
        opacify_background_0: rgba(230, 11, 48, 0.05),
    ),
    purple_theme: (
        font_color: #8F2DF3,
        background_color: #8F2DF3,
        border_color: #8F2DF3,
        opacify_background_0: rgba(143, 45, 243, 0.05),
    ),
    blue_theme: (
        font_color: #33A7FF,
        background_color: #33A7FF,
        border_color: #33A7FF,
        opacify_background_0: rgba(51, 167, 255, 0.05),
    ),
    green_theme: (
        font_color: #1FC551,
        background_color: #1FC551,
        border_color: #1FC551,
        opacify_background_0: rgba(31, 197, 81, 0.05),
    ),
    orange_theme: (
        font_color: #FF7F00,
        background_color: #FF7F00,
        border_color: #FF7F00,
        opacify_background_0: rgba(255, 127, 0, 0.05),
    ),
    golden_theme: (
        font_color: #CAA45A,
        background_color: #CAA45A,
        border_color: #CAA45A,
        opacify_background_0: rgba(202, 164, 90, 0.05),
    )
);
//遍历主题map
@mixin themeify {
  @each $theme-name, $theme-map in $themes {
    $theme-map: $theme-map !global;
    [data-theme="#{$theme-name}"] & {
      @content;
    }
  }
}

@function themed($key) {
  @return map-get($theme-map, $key);
}

//获取背景颜色
@mixin background_color($color) {
  @include themeify {
    background-color: themed($color)!important;
  }
}

//获取渐变背景颜色
@mixin background_linear($color, $deg, $min, $max) {
    @include themeify {
        background: linear-gradient($deg,  themed($color) $min,  themed($color) $max) !important;
    }
}

//获取字体颜色
@mixin font_color($color) {
  @include themeify {
    color: themed($color)!important;
  }
}

//获取边框颜色
@mixin border_color($color) {
  @include themeify {
    border-color: themed($color)!important;
  }
}
/* end--主题色--end */